home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
KernelVar
/
src
/
KernelVar.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
910b
|
47 lines
#ifndef RJS_KERNEL_CLASS_H
#define RJS_KERNEL_CLASS_H
#include <nlist.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/vmmeter.h>
#include <net/if.h>
class RJS_KernelVar {
public:
struct kern_loadav {
double la[3];
};
struct kern_ifnet {
char if_name[IFNAMSIZ];
short if_unit;
short if_flags;
int if_ipackets;
int if_ierrors;
int if_opackets;
int if_oerrors;
int if_collisions;
};
RJS_KernelVar();
~RJS_KernelVar();
static int pages_to_k(int n);
loadav(kern_loadav &kla);
int readk(unsigned long, char *,int);
int num_ifnet(int &n);
int get_ifnet(int n, kern_ifnet &kifnet);
int physmem(int &mem); // in k-bytes
int freemem(int &mem); // in k-bytes
int boottime(struct timeval &boot);
int vmstats(struct vmtotal &vt);
private:
// kernel stuff
static int init;
static int kmem;
};
#endif